/* 
 * AUTHOR: Kevin Lam
 */

package com.apps.ubc.cc;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


import com.google.appengine.api.taskqueue.Queue;
import com.google.appengine.api.taskqueue.QueueFactory;
import com.google.appengine.api.taskqueue.TaskOptions;

public class QueueSpider extends HttpServlet {

	public void doGet(HttpServletRequest req, HttpServletResponse resp){
		Queue q = QueueFactory.getQueue("spider");
		q.add(TaskOptions.Builder.withUrl("/spider").param("type",req.getParameter("type")));
//		q.add(TaskOptions.Builder.withUrl("/spider").param("type","department"));
//		q.add(TaskOptions.Builder.withUrl("/spider").param("type","course"));
//		q.add(TaskOptions.Builder.withUrl("/spider").param("type","section")); 
	}


}
